cmake_minimum_required(VERSION 2.8)
project( mahv )
find_package( OpenCV REQUIRED )

set (source_dir "src/")
set (include_dir "include/")
set (source_ext ".cpp")
set (target_ext ".app")

#Release
#Debug
SET(CMAKE_BUILD_TYPE "Debug")  

#-O0 -g2 -ggdb
list( APPEND CMAKE_CXX_FLAGS "-std=c++0x -O0 -g2 -ggdb -Wall -march=native ${CMAKE_CXX_FLAGS}")

include_directories(include/json11)
include_directories(include)
add_subdirectory(include/json11)

set(file_names 
    "main" 
    "gui-test")
#-----------------------target for gui-test.app--------------------------
add_executable( gui-test.app ${source_dir}gui-test.cpp )
target_link_libraries( gui-test.app ${OpenCV_LIBS} ncurses json11)

#-----------------------target for main.app--------------------------
add_executable( main.app
 ${source_dir}main.cpp
 ${source_dir}Config.cpp
 ${source_dir}Algorithm.cpp
 ${source_dir}Criminisi.cpp
 ${source_dir}Improved.cpp
 ${source_dir}LabController.cpp
)
#pthread
target_link_libraries( main.app ${OpenCV_LIBS} ncurses json11 pthread)

